package com.lqwu.manymanythumb.service;

import com.lqwu.manymanythumb.model.entry.Thumb;
import com.baomidou.mybatisplus.extension.service.IService;
import jakarta.servlet.http.HttpServletRequest;

/**
* @author 伍立权
* @description 针对表【thumb】的数据库操作Service
* @createDate 2025-05-18 23:46:31
*/
public interface ThumbService extends IService<Thumb> {
    /**
     * 点赞
     * @param blogId
     * @param request
     * @return
     */
    boolean doThumb(Long blogId, HttpServletRequest request);

    /**
     * 判断用户是否已经点赞
     * @param blogId
     * @param userId
     * @return
     */
    boolean hasThumb(Long blogId,Long userId);

    /**
     * 取消点赞
     * @param blogId
     * @param request
     * @return
     */
    boolean cancelThumb(Long blogId, HttpServletRequest request);
}
